﻿using System.Data;
using System.Runtime.Serialization;
using System.ServiceModel;

namespace HRMService
{
    
    [ServiceContract(Namespace = "http://HRMService")]
    public interface ICR
    {

        [OperationContract]
        DataSet CR_GetAllByRecruitmentID(int RecruitmentID);
        

        [OperationContract]
        CRInfo CR_GetInfo(int CRID);

        [OperationContract]
        DataSet CR_GetList(out int ItemCount, int _Status, string KeyWord, int RecruitmentID, int currentPage, int pageSize);

        [OperationContract]
        int CR_Insert(CRInfo eInfo);

        [OperationContract]
        bool CR_Update(CRInfo eInfo);

        [OperationContract]
        bool CR_Delete(int CRID);

        [OperationContract]
        bool CR_Exist(int CRID, int CandidateID, int RecruitmentID);

        [OperationContract]
        bool CR_CandidateMatriculate(int CR_ID, int Canidate_ID, int Status);
    }
    [DataContract(Namespace = "http://HRMService")]
    public class CRInfo
    {        
        #region VARIABLES

        int _ID;
        int _CandidateID;
        int _RecruitmentID;
        int _Year;
        int _Status;
        #endregion
        
        [DataMember]
        public int ID
        {
            get { return _ID; }
            set { _ID = value; }
        }
        [DataMember]
        public int CandidateID
        {
            get { return _CandidateID; }
            set { _CandidateID = value; }
        }
        [DataMember]
        public int RecruitmentID
        {
            get { return _RecruitmentID; }
            set { _RecruitmentID = value; }
        }
        [DataMember]
        public int Year
        {
            get { return _Year; }
            set { _Year = value; }
        }
        [DataMember]
        public int Status
        {
            get { return _Status; }
            set { _Status = value; }
        }

        

    }

}
